﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Reflection;

namespace STHPMS1.Common.C_Entity.Stmpms1
{
    public class Excel_BaseImportData : EntityBase, STHPMS1.ICore.I_Entity.Stmpms1.IExcel_BaseImportData
    {
        public Excel_BaseImportData() { }
         /// <summary>
        /// 根据对象查询属性添加到对应列集合
        /// </summary>
        /// <param name="obj"></param>
        public Excel_BaseImportData(object obj)
        {
            Type temp = obj.GetType();
            PropertyInfo[] propertys = temp.GetProperties();
            foreach (PropertyInfo p in propertys)
            {
                _dicColumn.Add(p.Name.ToUpper(), p.Name.ToUpper());
            }
        }

        private Dictionary<string, string> _dicColumn = new Dictionary<string, string>();
        /// <summary>
        /// 对应列
        /// </summary>
        public Dictionary<string, string> DicColumn { get { return _dicColumn; } }
        /// <summary>
        /// 导入数据源
        /// </summary>
        public DataTable DtSource { get; set; }
        /// <summary>
        /// 导入表名
        /// </summary>
        public string TableName { get; set; }
    }
}
